import ajax from '@/utils/ajax'

/**
 * @module 订单列表
 */

// 获取订单查询所需订单状态
export const getQueryOrderType = params => ajax.post('order/getAllOrderStatus', params)

// 获取订单查询所需油站列表
export const getQueryGasList = params => ajax.post('gasInfo/getAllGasInfoList', params)

// 获取订单查询所需油号列表
export const getOilNumList = params => ajax.get('/gasInfo/getAllOilNumList', params)

// 查询订单列表
export const queryOrderList = params => ajax.post('order/getOrdersByPage', params)

// 查询订单列表
export const getOrdersByPageNew = params => ajax.post('order/getOrdersByPageNew', params)

// 查询总金额
export const getSum = params => ajax.post('order/getSummary', params)

// 提交退款
export const submitRefund = params => ajax.post('order/applyRefund', params)

// 导出数据
export const exportData = params => ajax.post('order/exportOrdersExcel', params)

// 补打小票
export const makeSmallTicket = params => ajax.post('order/printTicket', params)

// 油站退款（确认退款）
export const confirmRefund = params => ajax.post('order/confirmRefund', params)

// 油站退款（拒绝退款）
export const rejectRefund = params => ajax.post('order/rejectRefund', params)

// 获取油站需要退款的订单数
export const getRefundNum = params => ajax.post('order/getRefundCountByGasId', params)

// 查询退款原因list
export const getRefundReason = params => ajax.post('order/getRefundReasonList', params)
/**
 * @module 订单详情
 */

// 获取订单详情
export const getOrderDetail = params => ajax.post('order/orderDetail', params)

/**
 * @module 连锁订单汇总
 */
// 导出
export const exportFileApi = params => ajax.post('chainOrder/exportChainOrderRecords', params)

// 查询列表
export const searchChainOrderList = params => ajax.post('chainOrder/queryChainOrderList', params)

// 查询汇总信息
export const queryChainOrderSum = params => ajax.post('chainOrder/queryChainOrderSummary', params)

// 是否显示实付金额
export const showRealAmount = params => ajax.post('handover/getShowRealPayAmount', params)


 // ---------预订单管理接口-----------

 // 预约列表接口
 export const reservationOrderByPage = params => ajax.post('order/reservationOrderByPage', params)

 // 预约状态下拉框接口
 export const reservationOrderStatus = params => ajax.post('order/reservationOrderStatus', params)

 // 预约确认订单接口
 export const reservationOrderConfirm = params => ajax.post('/order/reservationOrderConfirm', params)

// 加油确认接口
export const reservationOrderDeliver = params => ajax.post('/order/reservationOrderDeliver', params)

 // 获取加油枪号接口
 export const gunListByGasId = params => ajax.post('/gasInfo/gunListByGasId', params)

 // 取消订单接口
 export const reservationOrderCancel = params => ajax.post('order/reservationOrderCancel', params)

 // 预约订单详情
 export const reservationOrderDetail = params => ajax.post('order/reservationOrderDetail', params)
